<include file="Public:header" />

<script>
//移动内容 到分类
	function moveSupplier(e){
		var ids=new Array();
		$('.sall').each(function(index, element) {
            if($(this).prop('checked')== true){
				ids.push($(this).val());
			}
        });
		if(ids.length>0){
			if(confirm('您确定要移动选中记录吗？')){
			    window.location.href="{:U('moveSupplier')}?id="+ids.toString()+"&supplier_id="+e.value;
			}else{
				return false;
			}
		}else{
			error('请选择要移动的记录');
		}
	}
</script>

<div class="container main"> <include file="Public:left" />
  <div class="w790">
    <div class="h"><a href="{:U('add')}" class="btn btn-info"><i class="glyphicon glyphicon-plus"></i> 新建收款二维码</a>
     
		<form action="" method="get" class="fr form-inline" id="myform">
      
			

      <select name="supplier_id" class="form-control" onchange="$('#myform').submit()">
          <option value="0">请选择供货商</option>
          <volist name="suppier" id="vo"> <option 
            <eq name="supplier_id" value="$vo['id']">selected="selected"</eq>
              value="{$vo.id}">{$vo.susername}(<switch name="vo.type"><case value="1">线上</case><case value="2">线下</case></switch>)
            </option>
          </volist>
        </select>
      

        <input type="hidden" name="pagesize" value="{$pagesize}" />
        <input type="text" name="keywords" value="{$keywords}" class="form-control" />
        <button type="submit" class="btn btn-default">搜索</button>
      </form>
    </div>
    <div class="table_">
      <table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
        <thead>
          <tr>
            <td align="center">ID</td>
            <td align="center">名称</td> 
            <td align="center">图片</td>
            
<td align="center">商家</td>
            <td align="center">返利模式</td>
    
            
 
            <td align="center">操作</td>
          </tr>
        </thead>
        <volist name="list" id="vo">
          <tr class="data_list">
            <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" />
              {$vo.id}</td>
            <td> <span class="ajaxText" tablename="Product" field="title" id="{$vo.id}" val="{$vo.title}">{$vo.title}</span></td>
            <td><a href="{:U('Home/Ajax/qrcode', array('type' => 'url', 'data' => base64_encode('http://m.ydzh99.com/Productqr/index/id/'.$vo['id'].'/aff_id/'.getmemberidbysupplier_id($vo['supplier_id']).'.html'), 'level' => 1, 'size' => 10), true, false, true)}" target="_blank"><img src="{:U('Home/Ajax/qrcode', array('type' => 'url', 'data' => base64_encode('http://m.ydzh99.com/Productqr/index/id/'.$vo['id'].'/aff_id/'.getmemberidbysupplier_id($vo['supplier_id']).'.html'), 'level' => 1, 'size' => 10), true, false, true)}" width="200" /></a></td>
            <td align="center"><a target="_blank" href="{:U('Supplier/edit', array('id' => $vo['supplier_id']))}">{:getSupplier($vo['supplier_id'])}</a></td>
        
              <td align="center"><switch name="vo.RebateModel"><case value="1">8%系列</case><case value="2">16%系列</case><case value="3">2%系列</case><case value="4">4%系列</case><case value="0">无</case></switch></td>
          
           
           
			  
            <td align="center"><a href="{:U('delete',array('id'=>$vo['id']))}" onclick="return confirm('您确定要删除这条记录吗？');">删除</a></td>
          </tr>
        </volist>
      </table>
     
  </div>
  <div class="clear"></div>
</div>
<include file="Public:footer" />